var prefix_path="http://123.56.219.116:8080/virtualcat/manage/user/";

$(function () {

});

function login() {
    $.ajax({
        url: prefix_path+"login",
        type:"POST",
        dataType:"json",
        data:{
            "username":$("input[name='username']").val(),
            "password":$("input[name='password']").val()
        },
        success:function (data) {
            if(data.code==0){
                location.href="main.html";
            }else{
                alert("重新登陆");
            }

        },
        error:function () {
            alert("网络错误");
        }
    });
}